<?php
class Product_description_Model extends ORM
{
	protected $table_name = 'products_description';
	protected $primary_key = 'products_description_id';
	protected $col_product_id = 'products_id';
	protected $col_language_id = 'languages_id'; 
	protected $sorting = array('products_id' => 'desc');
	
	public function get($product_id='',$language_id='')
	{
		$this->db->from($this->table_name);
		$this->db->select('*');
		if($product_id) $this->db->where($this->col_product_id,$product_id);
		if($language_id) $this->db->where($this->col_language_id,$language_id);
		$this->db->orderby($this->primary_key,'desc');
		$query = $this->db->get();
		return $query->result_array(false);
	}
}